<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: mdf::CanMessage Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacemdf.html">mdf</a></li><li class="navelem"><a class="el" href="classmdf_1_1_can_message.html">CanMessage</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classmdf_1_1_can_message-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">mdf::CanMessage Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Helper class when logging CAN and CAN FD messages.  
 <a href="#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="canmessage_8h_source.html">canmessage.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abfa9471eebc6d696b799444d822fd96a" id="r_abfa9471eebc6d696b799444d822fd96a"><td class="memItemLeft" align="right" valign="top"><a id="abfa9471eebc6d696b799444d822fd96a" name="abfa9471eebc6d696b799444d822fd96a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>MessageId</b> (uint32_t msg_id)</td></tr>
<tr class="memdesc:abfa9471eebc6d696b799444d822fd96a"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN message ID. Note that bit 31 indicate extended ID. <br /></td></tr>
<tr class="separator:abfa9471eebc6d696b799444d822fd96a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe5176fd1d8d3a77e0c721138a08c6db" id="r_afe5176fd1d8d3a77e0c721138a08c6db"><td class="memItemLeft" align="right" valign="top"><a id="afe5176fd1d8d3a77e0c721138a08c6db" name="afe5176fd1d8d3a77e0c721138a08c6db"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>MessageId</b> () const</td></tr>
<tr class="memdesc:afe5176fd1d8d3a77e0c721138a08c6db"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN message ID. Note that bit 31 indicate extended ID. <br /></td></tr>
<tr class="separator:afe5176fd1d8d3a77e0c721138a08c6db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95e5f8ef1b979405a0626081ad976721" id="r_a95e5f8ef1b979405a0626081ad976721"><td class="memItemLeft" align="right" valign="top"><a id="a95e5f8ef1b979405a0626081ad976721" name="a95e5f8ef1b979405a0626081ad976721"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>CanId</b> () const</td></tr>
<tr class="memdesc:a95e5f8ef1b979405a0626081ad976721"><td class="mdescLeft">&#160;</td><td class="mdescRight">29/11 bit CAN message ID. Note that bit 31 is not used. <br /></td></tr>
<tr class="separator:a95e5f8ef1b979405a0626081ad976721"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae917d63a99b86c60ae7b12e4233efab1" id="r_ae917d63a99b86c60ae7b12e4233efab1"><td class="memItemLeft" align="right" valign="top"><a id="ae917d63a99b86c60ae7b12e4233efab1" name="ae917d63a99b86c60ae7b12e4233efab1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ExtendedId</b> (bool extended)</td></tr>
<tr class="memdesc:ae917d63a99b86c60ae7b12e4233efab1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the extended CAN ID bit. <br /></td></tr>
<tr class="separator:ae917d63a99b86c60ae7b12e4233efab1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a0010b8fd8e6180d64c66ae578abeac" id="r_a5a0010b8fd8e6180d64c66ae578abeac"><td class="memItemLeft" align="right" valign="top"><a id="a5a0010b8fd8e6180d64c66ae578abeac" name="a5a0010b8fd8e6180d64c66ae578abeac"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>ExtendedId</b> () const</td></tr>
<tr class="memdesc:a5a0010b8fd8e6180d64c66ae578abeac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the extended CAN ID. <br /></td></tr>
<tr class="separator:a5a0010b8fd8e6180d64c66ae578abeac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5ad1be80ae00c8719f141d32780c87c" id="r_aa5ad1be80ae00c8719f141d32780c87c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa5ad1be80ae00c8719f141d32780c87c">Dlc</a> (uint8_t dlc)</td></tr>
<tr class="memdesc:aa5ad1be80ae00c8719f141d32780c87c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the CAM message data length code.  <br /></td></tr>
<tr class="separator:aa5ad1be80ae00c8719f141d32780c87c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83e41ee9b9b5715add267e40777e9f5e" id="r_a83e41ee9b9b5715add267e40777e9f5e"><td class="memItemLeft" align="right" valign="top"><a id="a83e41ee9b9b5715add267e40777e9f5e" name="a83e41ee9b9b5715add267e40777e9f5e"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>Dlc</b> () const</td></tr>
<tr class="memdesc:a83e41ee9b9b5715add267e40777e9f5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the CAN message length code. <br /></td></tr>
<tr class="separator:a83e41ee9b9b5715add267e40777e9f5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3814d462b2a73070e46faad62a8270" id="r_a9b3814d462b2a73070e46faad62a8270"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9b3814d462b2a73070e46faad62a8270">DataLength</a> (size_t data_length)</td></tr>
<tr class="memdesc:a9b3814d462b2a73070e46faad62a8270"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets number of data bytes.  <br /></td></tr>
<tr class="separator:a9b3814d462b2a73070e46faad62a8270"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafba0fa2e12e2fb975aeab9b556817ff" id="r_aafba0fa2e12e2fb975aeab9b556817ff"><td class="memItemLeft" align="right" valign="top"><a id="aafba0fa2e12e2fb975aeab9b556817ff" name="aafba0fa2e12e2fb975aeab9b556817ff"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><b>DataLength</b> () const</td></tr>
<tr class="memdesc:aafba0fa2e12e2fb975aeab9b556817ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns number of data bytes. <br /></td></tr>
<tr class="separator:aafba0fa2e12e2fb975aeab9b556817ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf438ec6d845c65b129967e0e17efb78" id="r_abf438ec6d845c65b129967e0e17efb78"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abf438ec6d845c65b129967e0e17efb78">DataBytes</a> (const std::vector&lt; uint8_t &gt; &amp;data)</td></tr>
<tr class="memdesc:abf438ec6d845c65b129967e0e17efb78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the payload data bytes.  <br /></td></tr>
<tr class="separator:abf438ec6d845c65b129967e0e17efb78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e401e63c422890a4141bb5aaf0f0308" id="r_a8e401e63c422890a4141bb5aaf0f0308"><td class="memItemLeft" align="right" valign="top"><a id="a8e401e63c422890a4141bb5aaf0f0308" name="a8e401e63c422890a4141bb5aaf0f0308"></a>
const std::vector&lt; uint8_t &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>DataBytes</b> () const</td></tr>
<tr class="memdesc:a8e401e63c422890a4141bb5aaf0f0308"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the payload data bytes. <br /></td></tr>
<tr class="separator:a8e401e63c422890a4141bb5aaf0f0308"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc0e85e5d4322585e7ac5931f1a3ccd2" id="r_adc0e85e5d4322585e7ac5931f1a3ccd2"><td class="memItemLeft" align="right" valign="top"><a id="adc0e85e5d4322585e7ac5931f1a3ccd2" name="adc0e85e5d4322585e7ac5931f1a3ccd2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>DataIndex</b> (uint64_t index)</td></tr>
<tr class="memdesc:adc0e85e5d4322585e7ac5931f1a3ccd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal function for storing VLSD data offset. <br /></td></tr>
<tr class="separator:adc0e85e5d4322585e7ac5931f1a3ccd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fa88d73f8f960b5211bfd511d5374b4" id="r_a8fa88d73f8f960b5211bfd511d5374b4"><td class="memItemLeft" align="right" valign="top"><a id="a8fa88d73f8f960b5211bfd511d5374b4" name="a8fa88d73f8f960b5211bfd511d5374b4"></a>
uint64_t&#160;</td><td class="memItemRight" valign="bottom"><b>DataIndex</b> () const</td></tr>
<tr class="memdesc:a8fa88d73f8f960b5211bfd511d5374b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal function for the VLSD data offset. <br /></td></tr>
<tr class="separator:a8fa88d73f8f960b5211bfd511d5374b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff8d54612205b76e0fda44f06e5b373b" id="r_aff8d54612205b76e0fda44f06e5b373b"><td class="memItemLeft" align="right" valign="top"><a id="aff8d54612205b76e0fda44f06e5b373b" name="aff8d54612205b76e0fda44f06e5b373b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Dir</b> (bool transmit)</td></tr>
<tr class="memdesc:aff8d54612205b76e0fda44f06e5b373b"><td class="mdescLeft">&#160;</td><td class="mdescRight">If set true, the message was transmitted. <br /></td></tr>
<tr class="separator:aff8d54612205b76e0fda44f06e5b373b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32f7f1a7788325c0883350b6990bf876" id="r_a32f7f1a7788325c0883350b6990bf876"><td class="memItemLeft" align="right" valign="top"><a id="a32f7f1a7788325c0883350b6990bf876" name="a32f7f1a7788325c0883350b6990bf876"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Dir</b> () const</td></tr>
<tr class="memdesc:a32f7f1a7788325c0883350b6990bf876"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the message was transmitted. <br /></td></tr>
<tr class="separator:a32f7f1a7788325c0883350b6990bf876"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a692beb93fcc3ee7344e9999b114a1b0c" id="r_a692beb93fcc3ee7344e9999b114a1b0c"><td class="memItemLeft" align="right" valign="top"><a id="a692beb93fcc3ee7344e9999b114a1b0c" name="a692beb93fcc3ee7344e9999b114a1b0c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Srr</b> (bool srr)</td></tr>
<tr class="memdesc:a692beb93fcc3ee7344e9999b114a1b0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the SRR bit. *&zwj;/. <br /></td></tr>
<tr class="separator:a692beb93fcc3ee7344e9999b114a1b0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49357d996bb6c6aa9f2a52e29407f33f" id="r_a49357d996bb6c6aa9f2a52e29407f33f"><td class="memItemLeft" align="right" valign="top"><a id="a49357d996bb6c6aa9f2a52e29407f33f" name="a49357d996bb6c6aa9f2a52e29407f33f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Srr</b> () const</td></tr>
<tr class="memdesc:a49357d996bb6c6aa9f2a52e29407f33f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the SRR bit. <br /></td></tr>
<tr class="separator:a49357d996bb6c6aa9f2a52e29407f33f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb341ba7d09c2c250122d52dceebf5b" id="r_a4fb341ba7d09c2c250122d52dceebf5b"><td class="memItemLeft" align="right" valign="top"><a id="a4fb341ba7d09c2c250122d52dceebf5b" name="a4fb341ba7d09c2c250122d52dceebf5b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Edl</b> (bool edl)</td></tr>
<tr class="memdesc:a4fb341ba7d09c2c250122d52dceebf5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extended (CAN FD) data length. <br /></td></tr>
<tr class="separator:a4fb341ba7d09c2c250122d52dceebf5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cb9dbae938dcd39a03e7365bfc24b5e" id="r_a9cb9dbae938dcd39a03e7365bfc24b5e"><td class="memItemLeft" align="right" valign="top"><a id="a9cb9dbae938dcd39a03e7365bfc24b5e" name="a9cb9dbae938dcd39a03e7365bfc24b5e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Edl</b> () const</td></tr>
<tr class="memdesc:a9cb9dbae938dcd39a03e7365bfc24b5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extended (CAN FD) data length. <br /></td></tr>
<tr class="separator:a9cb9dbae938dcd39a03e7365bfc24b5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3bac26f48272624555c6b63f9aa3b89" id="r_ac3bac26f48272624555c6b63f9aa3b89"><td class="memItemLeft" align="right" valign="top"><a id="ac3bac26f48272624555c6b63f9aa3b89" name="ac3bac26f48272624555c6b63f9aa3b89"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Brs</b> (bool brs)</td></tr>
<tr class="memdesc:ac3bac26f48272624555c6b63f9aa3b89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit rate switch (CAN FD). <br /></td></tr>
<tr class="separator:ac3bac26f48272624555c6b63f9aa3b89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe4a610f825d13d16983ecaf533b02d" id="r_a2fe4a610f825d13d16983ecaf533b02d"><td class="memItemLeft" align="right" valign="top"><a id="a2fe4a610f825d13d16983ecaf533b02d" name="a2fe4a610f825d13d16983ecaf533b02d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Brs</b> () const</td></tr>
<tr class="memdesc:a2fe4a610f825d13d16983ecaf533b02d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit rate switch (CAN FD). <br /></td></tr>
<tr class="separator:a2fe4a610f825d13d16983ecaf533b02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1202fd5b87d1a4c92216e586a2480709" id="r_a1202fd5b87d1a4c92216e586a2480709"><td class="memItemLeft" align="right" valign="top"><a id="a1202fd5b87d1a4c92216e586a2480709" name="a1202fd5b87d1a4c92216e586a2480709"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Esi</b> (bool esi)</td></tr>
<tr class="memdesc:a1202fd5b87d1a4c92216e586a2480709"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error state indicator (CAN FD). <br /></td></tr>
<tr class="separator:a1202fd5b87d1a4c92216e586a2480709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a900ce630c946a96c171864b4e223c7" id="r_a3a900ce630c946a96c171864b4e223c7"><td class="memItemLeft" align="right" valign="top"><a id="a3a900ce630c946a96c171864b4e223c7" name="a3a900ce630c946a96c171864b4e223c7"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Esi</b> () const</td></tr>
<tr class="memdesc:a3a900ce630c946a96c171864b4e223c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error state indicator (CAN FD). <br /></td></tr>
<tr class="separator:a3a900ce630c946a96c171864b4e223c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0d4e7abc5258f456b4a1576520d4cd6" id="r_aa0d4e7abc5258f456b4a1576520d4cd6"><td class="memItemLeft" align="right" valign="top"><a id="aa0d4e7abc5258f456b4a1576520d4cd6" name="aa0d4e7abc5258f456b4a1576520d4cd6"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Rtr</b> (bool rtr)</td></tr>
<tr class="memdesc:aa0d4e7abc5258f456b4a1576520d4cd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the RTR bit (remote frame). <br /></td></tr>
<tr class="separator:aa0d4e7abc5258f456b4a1576520d4cd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d5f97082bc8da0075882219a793e3f5" id="r_a1d5f97082bc8da0075882219a793e3f5"><td class="memItemLeft" align="right" valign="top"><a id="a1d5f97082bc8da0075882219a793e3f5" name="a1d5f97082bc8da0075882219a793e3f5"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>Rtr</b> () const</td></tr>
<tr class="memdesc:a1d5f97082bc8da0075882219a793e3f5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the RTR bit. <br /></td></tr>
<tr class="separator:a1d5f97082bc8da0075882219a793e3f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ed49232ee5e6cb35a5c7246d487b707" id="r_a2ed49232ee5e6cb35a5c7246d487b707"><td class="memItemLeft" align="right" valign="top"><a id="a2ed49232ee5e6cb35a5c7246d487b707" name="a2ed49232ee5e6cb35a5c7246d487b707"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>WakeUp</b> (bool wake_up)</td></tr>
<tr class="memdesc:a2ed49232ee5e6cb35a5c7246d487b707"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate a CAN bus wake up status. <br /></td></tr>
<tr class="separator:a2ed49232ee5e6cb35a5c7246d487b707"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaaa69a1fed17365d77cb971b0ec80b6" id="r_afaaa69a1fed17365d77cb971b0ec80b6"><td class="memItemLeft" align="right" valign="top"><a id="afaaa69a1fed17365d77cb971b0ec80b6" name="afaaa69a1fed17365d77cb971b0ec80b6"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>WakeUp</b> () const</td></tr>
<tr class="memdesc:afaaa69a1fed17365d77cb971b0ec80b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate a CAN bus wake up message. <br /></td></tr>
<tr class="separator:afaaa69a1fed17365d77cb971b0ec80b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e4b8cd33e8749b03388eeffb5801fde" id="r_a7e4b8cd33e8749b03388eeffb5801fde"><td class="memItemLeft" align="right" valign="top"><a id="a7e4b8cd33e8749b03388eeffb5801fde" name="a7e4b8cd33e8749b03388eeffb5801fde"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>SingleWire</b> (bool single_wire)</td></tr>
<tr class="memdesc:a7e4b8cd33e8749b03388eeffb5801fde"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate a single wire CAN bus. <br /></td></tr>
<tr class="separator:a7e4b8cd33e8749b03388eeffb5801fde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6cd28a28df943c3d4954cf512dc7ddd" id="r_ae6cd28a28df943c3d4954cf512dc7ddd"><td class="memItemLeft" align="right" valign="top"><a id="ae6cd28a28df943c3d4954cf512dc7ddd" name="ae6cd28a28df943c3d4954cf512dc7ddd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>SingleWire</b> () const</td></tr>
<tr class="memdesc:ae6cd28a28df943c3d4954cf512dc7ddd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate a single wire CAN bus. <br /></td></tr>
<tr class="separator:ae6cd28a28df943c3d4954cf512dc7ddd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc76fd3595fdb9047f4a837542692a76" id="r_acc76fd3595fdb9047f4a837542692a76"><td class="memItemLeft" align="right" valign="top"><a id="acc76fd3595fdb9047f4a837542692a76" name="acc76fd3595fdb9047f4a837542692a76"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>BusChannel</b> (uint8_t channel)</td></tr>
<tr class="memdesc:acc76fd3595fdb9047f4a837542692a76"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bus channel. <br /></td></tr>
<tr class="separator:acc76fd3595fdb9047f4a837542692a76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6142599bab5b1af07424fcbab6b6c826" id="r_a6142599bab5b1af07424fcbab6b6c826"><td class="memItemLeft" align="right" valign="top"><a id="a6142599bab5b1af07424fcbab6b6c826" name="a6142599bab5b1af07424fcbab6b6c826"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>BusChannel</b> () const</td></tr>
<tr class="memdesc:a6142599bab5b1af07424fcbab6b6c826"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bus channel. <br /></td></tr>
<tr class="separator:a6142599bab5b1af07424fcbab6b6c826"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6c6d68cbbad4dd06b9df836fa0b1474" id="r_ae6c6d68cbbad4dd06b9df836fa0b1474"><td class="memItemLeft" align="right" valign="top"><a id="ae6c6d68cbbad4dd06b9df836fa0b1474" name="ae6c6d68cbbad4dd06b9df836fa0b1474"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>BitPosition</b> (uint8_t position)</td></tr>
<tr class="memdesc:ae6c6d68cbbad4dd06b9df836fa0b1474"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error bit position (error frame). <br /></td></tr>
<tr class="separator:ae6c6d68cbbad4dd06b9df836fa0b1474"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1751faa2e193c25a825ad4cac3b2d5af" id="r_a1751faa2e193c25a825ad4cac3b2d5af"><td class="memItemLeft" align="right" valign="top"><a id="a1751faa2e193c25a825ad4cac3b2d5af" name="a1751faa2e193c25a825ad4cac3b2d5af"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>BitPosition</b> () const</td></tr>
<tr class="memdesc:a1751faa2e193c25a825ad4cac3b2d5af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error bit position. <br /></td></tr>
<tr class="separator:a1751faa2e193c25a825ad4cac3b2d5af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0cdadc115de6d258d71cf8b689eb49b" id="r_ae0cdadc115de6d258d71cf8b689eb49b"><td class="memItemLeft" align="right" valign="top"><a id="ae0cdadc115de6d258d71cf8b689eb49b" name="ae0cdadc115de6d258d71cf8b689eb49b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ErrorType</b> (<a class="el" href="namespacemdf.html#a8d34dc5f782db723e4bbcecd657638b5">CanErrorType</a> error_type)</td></tr>
<tr class="memdesc:ae0cdadc115de6d258d71cf8b689eb49b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of error. <br /></td></tr>
<tr class="separator:ae0cdadc115de6d258d71cf8b689eb49b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1b3c65bf7853c8ba0cf1ccdb65036d8" id="r_ac1b3c65bf7853c8ba0cf1ccdb65036d8"><td class="memItemLeft" align="right" valign="top"><a id="ac1b3c65bf7853c8ba0cf1ccdb65036d8" name="ac1b3c65bf7853c8ba0cf1ccdb65036d8"></a>
<a class="el" href="namespacemdf.html#a8d34dc5f782db723e4bbcecd657638b5">CanErrorType</a>&#160;</td><td class="memItemRight" valign="bottom"><b>ErrorType</b> () const</td></tr>
<tr class="memdesc:ac1b3c65bf7853c8ba0cf1ccdb65036d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of error. <br /></td></tr>
<tr class="separator:ac1b3c65bf7853c8ba0cf1ccdb65036d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae980cb21e5e1da69fb45588c33a3a29c" id="r_ae980cb21e5e1da69fb45588c33a3a29c"><td class="memItemLeft" align="right" valign="top"><a id="ae980cb21e5e1da69fb45588c33a3a29c" name="ae980cb21e5e1da69fb45588c33a3a29c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>Reset</b> ()</td></tr>
<tr class="memdesc:ae980cb21e5e1da69fb45588c33a3a29c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset all flags an payload data buffers. <br /></td></tr>
<tr class="separator:ae980cb21e5e1da69fb45588c33a3a29c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec1e1c6cdae9eecd9ca3814543f3446a" id="r_aec1e1c6cdae9eecd9ca3814543f3446a"><td class="memItemLeft" align="right" valign="top"><a id="aec1e1c6cdae9eecd9ca3814543f3446a" name="aec1e1c6cdae9eecd9ca3814543f3446a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>ToRaw</b> (<a class="el" href="namespacemdf.html#afe80dc329a5936f1a7c9d3d7cddab9a7">MessageType</a> msg_type, <a class="el" href="structmdf_1_1_sample_record.html">SampleRecord</a> &amp;sample, size_t max_data_length, bool save_index) const</td></tr>
<tr class="memdesc:aec1e1c6cdae9eecd9ca3814543f3446a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an MDF sample record. Used primarily internally. <br /></td></tr>
<tr class="separator:aec1e1c6cdae9eecd9ca3814543f3446a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a2d1a49776df0935e3c33ce21107cb3d5" id="r_a2d1a49776df0935e3c33ce21107cb3d5"><td class="memItemLeft" align="right" valign="top"><a id="a2d1a49776df0935e3c33ce21107cb3d5" name="a2d1a49776df0935e3c33ce21107cb3d5"></a>
static size_t&#160;</td><td class="memItemRight" valign="bottom"><b>DlcToLength</b> (uint8_t dlc)</td></tr>
<tr class="memdesc:a2d1a49776df0935e3c33ce21107cb3d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the data length by DLC. <br /></td></tr>
<tr class="separator:a2d1a49776df0935e3c33ce21107cb3d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class is used when doing bus logging of A CAN or CAN FD bus. The MDF format for CAN logging is a type of standard. Channel naming is common which simplifies the reading of the file.</p>
<p>It is complex task to fix the bit stuffing that minimize number of bytes stored but this class handle most of that complex handling. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="abf438ec6d845c65b129967e0e17efb78" name="abf438ec6d845c65b129967e0e17efb78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf438ec6d845c65b129967e0e17efb78">&#9670;&#160;</a></span>DataBytes()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mdf::CanMessage::DataBytes </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; uint8_t &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the payload data bytes in the message. Note that this function also set the data length and DLC code. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9b3814d462b2a73070e46faad62a8270" name="a9b3814d462b2a73070e46faad62a8270"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b3814d462b2a73070e46faad62a8270">&#9670;&#160;</a></span>DataLength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mdf::CanMessage::DataLength </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>data_length</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The data length is not sent on the bus. Instead is it calculated from the DLC code. Note that the <a class="el" href="#abf438ec6d845c65b129967e0e17efb78" title="Sets the payload data bytes.">DataBytes()</a> function fix both data length and the DLC code so this function is normally not used. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data_length</td><td>Number of payload data bytes. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa5ad1be80ae00c8719f141d32780c87c" name="aa5ad1be80ae00c8719f141d32780c87c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5ad1be80ae00c8719f141d32780c87c">&#9670;&#160;</a></span>Dlc()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mdf::CanMessage::Dlc </td>
          <td>(</td>
          <td class="paramtype">uint8_t</td>          <td class="paramname"><span class="paramname"><em>dlc</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the data length code (DLC). The DLC is the same as data length for CAN but not for CAN FD. Note that the <a class="el" href="#abf438ec6d845c65b129967e0e17efb78" title="Sets the payload data bytes.">DataBytes()</a> function fix both data length and the DLC code so this function is normally not used. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dlc</td><td>Data length code. Sets the </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/mdf/<a class="el" href="canmessage_8h_source.html">canmessage.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
